package com.molichuxing.gateway.bff.goods.entity.response;

import java.math.BigDecimal;
import java.util.List;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.gateway.bff.orders.entity.response.CostDetailsVo;
import com.molichuxing.gateway.bff.orders.entity.response.DataVo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 加购、续订确认订单数据vo
 * 
 * @author zoumingyu
 * @date 2019年10月18日
 *
 */
@Data
public class GoodsConfirmVo extends ResponseRootDto {
	private static final long serialVersionUID = -6798492422271069891L;

	@ApiModelProperty(value = "订单号(原订单)")
	private Long orderCode;
	
	/**
	 * 品牌+车系+车型名称
	 */
	@ApiModelProperty(value = "商品名称")
	private String goodsName;
	
	@ApiModelProperty(value = "车辆id")
	private Integer carId;
	
	@ApiModelProperty(value = "品牌名称")
	private String brandName;
	
	@ApiModelProperty(value = "车系名称")
	private String seriesName;
	
	@ApiModelProperty(value = "车型名称")
	private String modelName;

	@ApiModelProperty(value = "车辆图片")
	private String carImg;

	@ApiModelProperty(value = "车牌号")
	private String licencePlate;

	/**
	 * 用车时长/里程，里程包
	 */
	@ApiModelProperty(value = "规格信息")
	private String specific;
	
	@ApiModelProperty(value = "赠送里程")
	private Integer giftMileage;
	
	@ApiModelProperty(value = "赠送里程")
	private String giftMileageStr;

	@ApiModelProperty(value = "下单门店id")
	private Integer storeId;

	@ApiModelProperty(value = "下单门店名")
	private String storeName;

	@ApiModelProperty(value = "续订租期说明")
	private String renewExplain;

	@ApiModelProperty(value = "加购说明")
	private List<DataVo> purchaseExplains;

	@ApiModelProperty(value = "费用明细")
	private List<CostDetailsVo> costs;
	
	@ApiModelProperty(value = "车辆当前行驶公里数")
	private Integer currentMileage;
	
	@ApiModelProperty(value = "合计")
	private BigDecimal totalFee;
	
	public GoodsConfirmVo setGiftMileage(Integer giftMileage) {
		this.giftMileage = giftMileage;
		this.giftMileageStr = giftMileage == null ? null : giftMileage + "公里";
		return this;
	}
}
